package com.dotflat.physicalevaluate.controller;

import com.dotflat.physicalevaluate.service.ImportService;
import com.tuo51.foudation.model.StatusResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * 附近的合作伙伴
 */
@RestController
@RequestMapping("/mapi/import")
@Api(value = "/mapi/import", tags = "OP - 数据导入")
public class ImportController {
    @Autowired
    private ImportService importService;

    @ApiOperation(value = "导入维度",httpMethod = "POST")
    @RequestMapping(value = "/import_dimension", method = RequestMethod.POST, headers="content-type=multipart/form-data")
    public StatusResponse importQuestion(@RequestParam(value = "file", required = false) MultipartFile file) {

//            return StatusResponse.success(importService.importEvaluateDimension(file));
        return null;
    }

    @ApiOperation(value = "导入测量元数据",httpMethod = "POST")
    @RequestMapping(value = "/import_measure", method = RequestMethod.POST, headers="content-type=multipart/form-data")
    public StatusResponse importHighLevelInfo(@RequestParam(value = "file", required = false) MultipartFile file) {

//        return StatusResponse.success(importService.importEvaluateMeasure(file));
        return null;
    }

}
